import {HEADER_DATA} from './actionType.js'
import axios from 'axios'

export const getHeaderData = () => (dispatch) => {
  axios({
      method: 'post',
      url: 'http://localhost:3000/api',
      data: {
        url: 'http://i.waimai.meituan.com/ajax/v7/home/head',
        params: {
          not_need_primary_filter: false,
          useid: ''
        }
      }
    }).then(res => {
      dispatch({
        type: HEADER_DATA,
        obj: res.data
      })
    })
}